#include<cstdio>
#include<stack>
#include<queue>
#include<map>
#include<set>
#include<vector>
using namespace std;
class MyQueue {
public:
    /** Initialize your data structure here. */
    stack<int> sin,sout;
    MyQueue() {
        
    }
    /** Push element x to the back of queue. */
    void push(int x) {
    	sin.push(x);
    }
    /** Removes the element from in front of queue and returns that element. */
    int pop() {
		int ans=peek();
		sout.pop();
		return ans;
    }
    
    /** Get the front element. */
    int peek() {
		if(sout.empty()){
    		while(!sin.empty()){
				int temp=sin.top();
				sin.pop();
				sout.push(temp);
			}
		}
		return sout.top();
    }
    /** Returns whether the queue is empty. */
    bool empty() {
		return sin.empty()&&sout.empty();
    }
};

/**
 * Your MyQueue object will be instantiated and called as such:
 * MyQueue* obj = new MyQueue();
 * obj->push(x);
 * int param_2 = obj->pop();
 * int param_3 = obj->peek();
 * bool param_4 = obj->empty();
 */
int main(){

	return 0;
}
